package office.word.aspose;

import com.aspose.words.Document;
import com.aspose.words.ITextShaperFactory;
import com.aspose.words.Watermark;
import com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory;

import java.awt.*;
import java.awt.image.BufferedImage;

public class TestAspose {

    public static void main(String[] args) throws Exception {
        Document doc = new Document("D:\\codespace\\alldemo\\java-test-project\\templates\\测试.doc");
        Watermark watermark = doc.getWatermark();
        watermark.remove();
        watermark.setImage("D:\\codespace\\alldemo\\java-test-project\\templates\\1.png", null);
        watermark.setText("你好", null);



        doc.save("abc.pdf");

    }

}
